package com.qingge.springboot.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.qingge.springboot.entity.Subject;
import com.qingge.springboot.mapper.SubjectMapper;
import com.qingge.springboot.service.ISubjectService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 服务实现类
 * </p>
 *
 * @author xyc
 * @since 2022-04-13
 */
@Service
public class SubjectServiceImpl extends ServiceImpl<SubjectMapper, Subject> implements ISubjectService {

    @Resource
    private SubjectMapper subjectMapper;

    @Override
    public Integer getSubjectCount() {
        return subjectMapper.getSubjectCount();
    }

    @Override
    public Page<Subject> findPage(Page<Subject> objectPage) {
        return subjectMapper.findPage(objectPage);
    }

    @Override
    public Page<Subject> findPage2(Page<Subject> objectPage) {
        return subjectMapper.findPage2(objectPage);
    }

    @Override
    public List<Subject> findSubjectByName(String stuName) {
        return subjectMapper.findSubjectByName(stuName);
    }

    @Override
    public List<Subject> findSubjectById(Integer id) {
        return subjectMapper.findSubjectById(id);
    }

    @Override
    public String findStuName(Integer id) {
        return subjectMapper.findStuName(id);
    }


    @Override
    public void clearFlag() {
        subjectMapper.clearFlag();
    }

    @Override
    public void setFlagNew(Integer id) {
        subjectMapper.setFlagNew(id);
    }

    @Override
    public Integer showCourse(String username) {
        return subjectMapper.showCourse(username);
    }

    @Override
    public void chooseFlag(String username) {
        subjectMapper.chooseFlag(username);
    }

    @Override
    public List<Subject> inputScore(Integer id) {
        return subjectMapper.inputScore(id);
    }

    @Override
    public String findSubjectNum(Integer id) {
        return subjectMapper.findSubjectNum(id);
    }


}
